package com.older.wptsb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.older.wptsb.domain.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("SELECT COUNT(*) FROM user_elder_rel WHERE user_id = #{userId}")
    int countElderBindings(Long userId);
    void updateByUserId(User user);
    @Select("SELECT * FROM user WHERE user_id = #{currentUserId}")
    User selectByUserId(Long currentUserId);
}
